package com.zuo.util;

import org.springframework.util.DigestUtils;

/**
 * @Author 白白旧维
 * @Date 2022/3/16 11:15
 */
public class MD5 {

    private static String salt="salt.v;'cxz[]fds;af.ds;'12.'1;32][cvd.x]z.]";

    public static String md5(String str){
        return DigestUtils.md5DigestAsHex(str.getBytes());
    }

    public static String md5WithSalt(String str){
        return DigestUtils.md5DigestAsHex((str+salt).getBytes());
    }

}
